package com.ipzoe.file.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("file_info")
public class FileInfoDO {

    public static final String COLUMN_CREATE_TIME = "create_time";
    public static final String COLUMN_NAME = "name";

    /**
     * 文件md5
     */
    @TableId(value = "id")
    private String id;

    @TableField("name")
    private String name;

    @TableField("is_img")
    private Boolean isImg;

    @TableField("content_type")
    private String contentType;

    @TableField("size")
    private Long size;

    /**
     * 物理路径
     */
    @TableField("path")
    private String path;

    @TableField("url")
    private String url;

    @TableField("source")
    private String source;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;
}

